package com.zxj.test.model;

import com.zxj.test.model.dto.EmployeeDTO;

/**
 * @author zxj
 * @date 2020/7/18
 */
public class Employee {

    private Integer id;

    private Integer age;

    private String name;

    private String address;

    private String gender;

    public static Employee fromDto(EmployeeDTO dto) {
        Employee employee = new Employee();
        employee.setName(dto.getName());
        employee.setAddress(dto.getAddress());
        employee.setAge(dto.getAge());
        employee.setId(dto.getId());
        employee.setGender(dto.getGender());
        return employee;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
}
